package mapred.task;

import java.io.IOException;

import mapred.AdvancedMapReduceBase;

import org.apache.hadoop.io.Writable;
import org.apache.hadoop.mapred.Mapper;
import org.apache.hadoop.mapred.OutputCollector;
import org.apache.hadoop.mapred.Reporter;

public abstract class AbstractMapper<Ki extends Writable, Vi extends Writable, Ko extends Writable, Vo extends Writable>
        extends AdvancedMapReduceBase implements Mapper<Ki, Vi, Ko, Vo> {

    @Override
    public abstract void map(Ki key, Vi value, OutputCollector<Ko, Vo> output,
            Reporter reporter) throws IOException;

    public String getInputFileName() {
        return this.getConfig("map.input.file");
    }

}
